home *** CD-ROM | disk | FTP | other *** search
- #include <windows.glo>
- #include <windows.h>
- #include <fcntl.h>
- #include <dos.h>
- #include <ctype.h>
-
- #define NULL 0
-
-
- main ()
- {
- static struct WINDOW *w1 = NULL;
- struct WINDOW *w2[10];
- int x, y, colorbuf1, colorbuf2;
- register i;
-
- get_video_mode ();
- if (!w1)
- {
- w1 = push_window(13,1,54,10,1,0, "RH", "Bill's Window Demo", blue);
- w_printf( w1,0,1," Window routines for Turbo C 2.0 ",green);
- w_printf( w1,0,2," Designed and written by Bill Crum. ",white);
- w_printf( w1,0,3," If you are even slightly impressed,",cyan);
- w_printf( w1,0,4," I am looking for work as a programmer.",red);
- w_printf( w1,0,5," Work #408-945-0294.",brown);
- w_printf( w1,0,6," or message on PDSE #408-745-0880.",brown);
-
- }
- else
- push (w1);
- cursor_off ();
- delay (2500);
- colorbuf1 = black;
- colorbuf2 = blue;
- for ( y = 0; y < 10; y++ )
- {
- if (y < 5)
- {
- w2[y] = push_window(2 + (4 * y),2 + (3 * y),50,8,1,y, "NR", "Exploding Window", black += 0x10);
- w_printf( w2[y],0,2," There are 5 styles of borders.",red);
- w_printf( w2[y],0,3," And a variety of background colors.",brown);
- delay (500);
- }
- else
- {
- w2[y] = push_window(2 + (4 * (y - 5)),2 + (3 * (y - 5)),50,8,0,y - 5, "RN", "Normal Window", blue += 0x10);
- w_printf( w2[y],0,1," If you are even slightly impressed,",cyan);
- w_printf( w2[y],0,2," I am looking for work as a programmer.",brown);
- w_printf( w2[y],0,3," If you are even slightly impressed,",white);
- w_printf( w2[y],0,4," I am looking for work as a programmer.",green);
- delay (500);
- }
- }
-
- black = colorbuf1;
- blue = colorbuf2;
- clr_window (w2[9]);
- w_printf (w2[9],0,2," Window cleared using clr_window( *wn.)",red);
- delay (2000);
- clr_window (w2[9]);
- delay (2000);
- w_printf (w2[9],0,5," Scrolled up using scroll_window(*wn,1)",red);
- for ( y = 0; y < 6; y++)
- {
- delay (500);
- scroll_window (w2[9],1);
- }
- delay (1000);
- w_printf (w2[9],0,0," Or scrolled down using scroll_window(*wn,0)",red);
- for ( y = 0; y < 6; y++)
- {
- delay (500);
- scroll_window (w2[9],0);
- }
- delay (2500);
-
- for ( y = 9; y >= 0; y-- )
- {
- delay (500);
- close_wind (w2[y]);
- }
- w_printf (w1,0,7," Hit ESCape to exit.",white);
-
- while (getchx() != 0x1b);
- pop (w1);
- cursor_on ();
- }
-
-
-
-